from xgolib import XGO
import time
dog = XGO("xgolite") 
version=dog.read_firmware()
if version[0]=='M':
    print('XGO-MINI')
    dog = XGO("xgomini")
    dog_type='M'
else:
    print('XGO-LITE')
    dog_type='L'

#机身以3s的周期进行滚转角往复转动，以7.4s周期进行偏航角往复转动
# dog.periodic_rot(['r','y'],[3,7.4])
# time.sleep(2)
#停止偏航角的往复转动
dog.periodic_rot('y',0)
# time.sleep(3)
dog.stop()
print("Hello, Raspberry Pi!")